package javaExperiment;

public class Factory {
	public IFood getInstance(String className) {
		IFood food;
		if(className.equals("bread"))
		{
			food =new Bread();
			return food;
		}
		else
		{
			food=new Milk();
			return food;
		}
	}
}
